//主页一些小效果
import { } from "https://cdn.bootcdn.net/ajax/libs/jquery/1.12.4/jquery.js";
import { } from "./jquery.lazyload.js";

// 头部广告
const $top = $(".top");
const $top_close = $(".top_close");
$top_close.on("click", function () {
    $top.animate({
        height: 0
    }, 500);
    $("main").animate({
        marginTop: "40px"
    }, 500)
    $top_close.hide();
});

// 商品的hover效果
$(".mod_floor .goods_item").hover(function () {
    $(this).css({
        boxShadow: "0 15px 30px rgb(0 0 0 / 20%)",
        transform: "translateY(-2px)",
        transition: "0.2s all ease-out"
    })

}, function () {
    $(this).css({
        boxShadow: "0 0 0 rgb(0 0 0 / 0%)",
        transform: "translateY(0px)",
        transition: "0.2s all ease-out"
    })
});

//懒加载
$("img.lazy").lazyload({
    effect: "fadeIn"
});
